package models

import "time"

type TransactionRequest struct {
    Month        string        `json:"month"`
    Transactions []Transaction `json:"transactions"`
}

type Transaction struct {
    Date     string  `json:"date"`
    Time     string  `json:"time"`
    Type     string  `json:"type"`      // "income" or "expense"
    Category string  `json:"category"`
    Amount   float64 `json:"amount"`
    Remark   string  `json:"remark"`
}

type Response struct {
    Success   bool        `json:"success"`
    Message   string      `json:"message"`
    Timestamp int64       `json:"timestamp"`
}

func CreateResponse(success bool, message string) Response {
    return Response{
        Success:   success,
        Message:   message,
        Timestamp: time.Now().UnixMilli(),
    }
}